<style>
    .layui-form-label {
        width: 160px;
    }
</style>
<div class="widget-head" style="margin-top:0;">
    <div class="widget-title">邮箱设置</div>
</div>
<div class="layui-container" style="width:100%;">
    <form class="layui-form" action="/admin/config/edit_post">
        <div class="layui-form-item">
            <label class="layui-form-label">MAIL_HOST</label>
            <div class="layui-input-block">
                <input type="text" name="config[MAIL_HOST]" value="{$info.config.MAIL_HOST}" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">MAIL_USERNAME</label>
            <div class="layui-input-block">
                <input type="text" name="config[MAIL_USERNAME]" value="{$info.config.MAIL_USERNAME}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">MAIL_FROM</label>
            <div class="layui-input-block">
                <input type="text" name="config[MAIL_FROM]" value="{$info.config.MAIL_FROM}" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">MAIL_FROMNAME</label>
            <div class="layui-input-block">
                <input type="text" name="config[MAIL_FROMNAME]" value="{$info.config.MAIL_FROMNAME}" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">MAIL_PASSWORD</label>
            <div class="layui-input-block">
                <input type="password" name="config[MAIL_PASSWORD]" value="{$info.config.MAIL_PASSWORD}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">模板</label>
            <div class="layui-input-block" style="margin-left: 160px;">
                <textarea name="config[tpl]" id="editor" style="width:600px;height:300px;">{$info.config.tpl}</textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="hidden" name="name" value="邮箱设置">
                <input type="hidden" name="key" value="{$info.key}">
                <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['jquery', 'think'], function() {
        var $ = layui.jquery,
            think = layui.think;
        //异步加载ueditor
        think.load_js('/Public/ueditor1.4.3/ueditor.config.js', function() {
            think.load_js('/Public/ueditor1.4.3/ueditor.all.min.js', function() {
                think.load_js('/Public/ueditor1.4.3/lang/zh-cn/zh-cn.js', function() {
                    var editor = UE.getEditor('editor');
                });
            })
        });
    });
</script>